package thread;

public class Thread_get2 {
    public static void main(String[] args) {
        Thread t1 = new Thread(()->{
            Thread t =Thread.currentThread();//获取当前线程的引用
            System.out.println(t.getId()+","+t.getName());
        });
        Thread t2 = new Thread(()->{
            Thread t =Thread.currentThread();
            System.out.println(t.getId()+","+t.getName());
        });
        t1.start();
        t2.start();
    }
}
